package cn.forge.mall.framework.security.config;

import cn.forge.mall.framework.security.core.rpc.LoginUserRequestInterceptor;
import cn.forge.mall.system.api.oauth2.OAuth2TokenApi;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author liangyuanping
 * @ClassName ForgeSecurityRpcAutoConfiguration
 * @description:
 * @date 2024年03月21日
 * @version: 1.0
 */
@AutoConfiguration
@EnableFeignClients(clients = {OAuth2TokenApi.class})// 主要是引入相关的 API 服务
public class ForgeSecurityRpcAutoConfiguration {

    @Bean
    public LoginUserRequestInterceptor loginUserRequestInterceptor() {
        return new LoginUserRequestInterceptor();
    }

}
